package edu.nanyang.hibernate.service;

import java.util.List;

import edu.nanyang.domain.Goods;
import edu.nanyang.domain.Photo;
import edu.nanyang.domain.User;
import edu.nanyang.util.GoodsHelper;
import edu.nanyang.util.QueryResult;

public interface IGoodsService {
	public List<GoodsHelper> getGoodsByJingpaiUserid(int userId);
	public boolean refreshGoods(int goodsId);
	public boolean shenHeGoods(int goodsId,int shenHe);
	public List<GoodsHelper> getGoodsUnverified();
	public boolean saleGoods(int goodsId,int userId);
	public List<GoodsHelper> getGoodsByUser(User user);
	public GoodsHelper acquireGoodsById(int id);
	public boolean addGoods(Goods g,int schoolId,Photo photo,User user);
	public long acquireTotalGoodsNumByCurrCityID(int cityID);
	public List<GoodsHelper> acquireGoodsByCurrCity(int cityID,int page,int pageSize);
	/**
	 * 
	 * @param buyOrSale 
	 * @param schoolId
	 * @param goodsType
	 * @param priceFrom
	 * @param priceTo
	 * @param lookOnlineOnly
	 * @param sortType
	 * @param queryStringdetail
	 * @param queryDays
	 * @param page
	 * @param pageSize
	 * @return
	 */
	public QueryResult<GoodsHelper> acquireGoodsByDetail(String buyOrSale, 
											int schoolId,
											String goodsType, 
											double priceFrom, 
											double priceTo,
											boolean lookOnlineOnly, 
											String sortType, 
											String queryStringdetail,
											int queryDays, 
											int page, 
											int pageSize,int cityId);
}
